home *** CD-ROM | disk | FTP | other *** search
- head 1.3;
- branch ;
- access ;
- symbols sprited:1.3.1;
- locks ; strict;
- comment @# @;
-
-
- 1.3
- date 88.11.13.16.17.59; author ouster; state Exp;
- branches 1.3.1.1;
- next 1.2;
-
- 1.2
- date 88.11.13.15.14.09; author ouster; state Exp;
- branches ;
- next 1.1;
-
- 1.1
- date 88.06.19.14.35.39; author ouster; state Exp;
- branches ;
- next ;
-
- 1.3.1.1
- date 91.09.25.23.06.46; author kupfer; state Exp;
- branches ;
- next ;
-
-
- desc
- @@
-
-
- 1.3
- log
- @Undo last change: the old way is the correct ANSI C way.
- @
- text
- @|*
- |* start.s --
- |*
- |* Header to set up argc, argv for main(), as well as set up environment
- |* pointers for Unix routines.
- |*
- |* Copyright 1966, 1988 Regents of the University of California
- |* Permission to use, copy, modify, and distribute this
- |* software and its documentation for any purpose and without
- |* fee is hereby granted, provided that the above copyright
- |* notice appear in all copies. The University of California
- |* makes no representations about the suitability of this
- |* software for any purpose. It is provided "as is" without
- |* express or implied warranty.
- |*
-
- .data
- .asciz "$Header: /sprite/src/lib/c/crt/sun3.md/RCS/start.s,v 1.1 88/06/19 14:35:39 ouster Exp $ SPRITE (Berkeley)"
- .even
- .globl _environ
- _environ:
- .long 0
-
- .text
- .long 0
- trap #15 | Processes starting off in debug mode will
- | start here.
- .globl start
- start:
- movl sp@@,d2 | argc
- lea sp@@(4),a3 | argv
- movl d2, d0 | pass argc + 1 as one param
- addql #1, d0 | to lmult
- movl #4, d1 | want 4 * (argc + 1)
- jsr lmult |
- movl a3, d1 | take argv and ...
- addl d0, d1 | ... go past it by (argc + 1) 4-byte fields
- movl d1,_environ | set the global _environ variable
- movl d1,sp@@- | push envp
- movl a3,sp@@- | push argv
- movl d2,sp@@- | push argc
- lea 0,a6 | stack frame link 0 in main -- for dbx
- jsr _main | main(argc, argv, envp)
- addw #12,sp
- movl d0,sp@@-
- jsr _exit | exit( ... )
- addql #4,sp
- rts
- @
-
-
- 1.3.1.1
- log
- @Initial branch for Sprite server.
- @
- text
- @d18 1
- a18 1
- .asciz "$Header: /sprite/src/lib/c/crt/sun3.md/RCS/start.s,v 1.3 88/11/13 16:17:59 ouster Exp $ SPRITE (Berkeley)"
- @
-
-
- 1.2
- log
- @When main returns, ignore return value and exit with status 0.
- @
- text
- @d18 1
- a18 1
- .asciz "$Header: start.s,v 1.1 88/06/19 14:35:39 ouster Exp $ SPRITE (Berkeley)"
- d45 2
- a46 2
- clrl sp@@-
- jsr _exit | exit(0)
- @
-
-
- 1.1
- log
- @Initial revision
- @
- text
- @d18 1
- a18 1
- .asciz "$Header: unixCrt0.s,v 1.2 87/12/24 16:12:09 douglis Exp $ SPRITE (Berkeley)"
- d45 2
- a46 2
- movl d0,sp@@-
- jsr _exit | exit( ... )
- @
-